package com.example.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.pojo.Word;

import java.util.List;

/**
 * @author HL
 */
public interface IWordsService extends IService<Word> {
    Word getWordsBySpell(String spell);
    Integer getLearn(Integer userId, String bookName);
    Integer getReview(Integer userId, String bookName);
    List<Word> getWords(String bookName, Integer count, Integer start);
    void updateLearn(Integer userId, String bookName, Integer learn);
    void updateReview(Integer userId, String bookName, Integer review);
    List<Word> getUserLike(Integer userId);
    void addUserLike(Integer userId, Integer wordId);
    void deleteUserLike(Integer userId, Integer wordId);
    Boolean isUserLike(Integer userId, Integer wordId);
    Integer getWordCollection(Integer wordId);
    void updateWordCollection(Integer wordId);
    List<Word> getWordsByBook(String bookName);
}
